<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=xXgGEONo5fqg585HvS1rHIKylYfBXDVz">
</script>

<body>
  <div id="container"></div>
</body>
<script>
  var map = new BMapGL.Map("container");
  var point = new BMapGL.Point(117.32, 33.32);
  map.centerAndZoom(point, 15); 
  var scaleCtrl = new BMapGL.ScaleControl();  // 添加比例尺控件
  map.addControl(scaleCtrl);
  var zoomCtrl = new BMapGL.ZoomControl();  // 添加缩放控件
  map.addControl(zoomCtrl);
  map.enableScrollWheelZoom(true);   
  map.setMapType(BMAP_EARTH_MAP);
  var cityCtrl = new BMapGL.CityListControl();  // 添加城市列表控件
  map.addControl(cityCtrl);
  var polyline = new BMapGL.Polyline([
		new BMapGL.Point(117.31198,33.316457),
		new BMapGL.Point(117.315357,33.313289),
		new BMapGL.Point(117.316399,33.312686),
		new BMapGL.Point(117.318304,33.312444),
		new BMapGL.Point(117.319454,33.311871),
	], {strokeColor:"red", strokeWeight:5, strokeOpacity:.8});
  map.addOverlay(polyline);
  var polyline1 = new BMapGL.Polyline([
		new BMapGL.Point(117.313309,33.323109),
		new BMapGL.Point(117.314962,33.324135),
		new BMapGL.Point(117.315501,33.323652),
		new BMapGL.Point(117.313884,33.322566),
	], {strokeColor:"red", strokeWeight:5, strokeOpacity:.8});
  map.addOverlay(polyline1);
  var polyline2 = new BMapGL.Polyline([
		new BMapGL.Point(117.315573,33.323682),
		new BMapGL.Point(117.318268,33.322989),
		new BMapGL.Point(117.318187,33.321412),
		new BMapGL.Point(117.318187,33.321412),
		new BMapGL.Point(117.317945,33.320281),
		new BMapGL.Point(117.316947,33.320349),

	], {strokeColor:"red", strokeWeight:5, strokeOpacity:.8});
  map.addOverlay(polyline2);


  var point = new BMapGL.Point(117.33, 33.32);   
  var marker = new BMapGL.Marker(point);        // 创建标注   
  map.addOverlay(marker);       
  marker.addEventListener("click", function(){   
    alert("您点击了标注");   
  });
</script>

<style type="text/css">  
  html{height:100%}    
  body{height:100%;margin:0px;padding:0px}    
  #container{height:100%}    
</style> 
</html>